﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using thinger.com.Models;

namespace thinger.com.MyFirstOPCDemo
{
    public partial class FrmParamSet : Form
    {
        public FrmParamSet(OPCDAVariable var)
        {
            InitializeComponent();

            this.txt_VarName.Text = var.OPCItemID;
            this.txt_VarType.Text = var.OPCDataType;
            this.txt_InitialValue.Text = var.OPCValue;

        }


        // 设定值
        public string SetValue = string.Empty;

        // 设定方式
        public bool IsSync = true;

        private void btn_OK_Click(object sender, EventArgs e)
        {
            this.SetValue = this.txt_SetValue.Text;
            this.IsSync = this.rdo_SyncWrite.Checked;

            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        private void btn_Cancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
